import type { InjectionKey } from 'vue';

export const STATES = {
  view: 'view',
  edit: 'edit',
  solid: 'solid',
} as const;

export type State = keyof typeof STATES;

export function isState(state: any) {
  return Object.values(STATES).includes(state);
}

export enum EXPAND {
  open = 'open',
  close = 'close',
}

export const easyTableColumnKey: InjectionKey<{ state: State }> =
  Symbol('easy-table-column-expand');
